﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Common;
using System.Data;

namespace Dao
{
    public class MemberStatisticData
    {
        public MemberStatisticData()
        { }
        public double TotalMember()
        {
            SqlConnection conn = new SqlConnection(SQLDBHelper.CONN_STRING);
            Int64 total = 0;
            SqlDataReader reader = SQLDBHelper.ExecuteReader(conn, CommandType.StoredProcedure, "sp_TotalMember", null);
            if (reader.Read())
            {
                return reader.GetInt32(0);
            }
            return 0;
        }
        public string NewMember()
        {
            string str = "";
            SqlConnection conn = new SqlConnection(SQLDBHelper.CONN_STRING);
            SqlDataReader reader = SQLDBHelper.ExecuteReader(conn, CommandType.StoredProcedure, "sp_MemberStatistic_NewMember", null);
            if (reader.Read())
            {
                if (!reader.IsDBNull(0))
                    str = reader.GetString(0);

            }
            return str;
        }
    }
}
